<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">

<head>
    <th:block th:include="common/common_head :: commonHeader('信息记录价格批量导入')"/>
    <link rel="stylesheet" th:href="@{/static/js/plugins/jquery-layout/jquery.layout-latest.css}">
    <style type="text/css">
        .ibox-content {
            padding-bottom: 10px !important;
        }

        body {
            width: 3000px;
            overflow-x: visible
        }

        .table th {
            border: 1px solid #e7eaec;
            text-align: center
        }

        .table td {
            border: 1px solid #e7eaec;
            text-align: center
        }

    </style>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content" style="overflow-x:visible">
                    <table class="table" id="dataTable">
                        <tr>
                            <th>供应商编码</th>
                            <th>供应商名称</th>
                            <th>物料号</th>
                            <th>物料描述</th>
                            <th>采购组织</th>
                            <th>信息类别</th>
                            <th>订单单位</th>
                            <th>采购组</th>
                            <th>标准数量</th>
                            <th>税代码</th>
                            <th>含税单价</th>
                            <th>条件货币</th>
                            <th>周期</th>
                            <th>价格计量单位</th>
                            <th>起始日期</th>
                            <th>截止日期</th>
                        </tr>
                        <tr th:each="inforecord : ${session.impInforecordList}">
                            <td th:text="${inforecord.pkId}" style="display: none"></td>
                            <td th:text="${inforecord.srmCode}" class="vendorCode"></td>
                            <td th:text="${inforecord.vendorName}"></td>
                            <td th:text="${inforecord.materialCode}"></td>
                            <th th:text="${inforecord.materialDesc}"></th>
                            <td th:text="${inforecord.purchArg}"></td>
                            <td th:text="${inforecord.classify}"></td>
                            <td th:text="${inforecord.purchaseUnit}"></td>
                            <td th:text="${inforecord.purchaseGroup}"></td>
                            <td th:text="${inforecord.standardNum}"></td>
                            <td th:text="${inforecord.taxCode}"></td>
                            <td th:text="${inforecord.price}"></td>
                            <td th:text="${inforecord.currency}"></td>
                            <td th:text="${inforecord.cycle}"></td>
                            <td th:text="${inforecord.priceUnit}"></td>
                            <td th:text="${#dates.format(inforecord.startData,'yyyy-MM-dd')}"></td>
                            <td th:text="${#dates.format(inforecord.priceEndData,'yyyy-MM-dd')}"></td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12" style="text-align: center">
            <input class="btn btn-primary" type="button" onclick="save()" value="确定保存" style="margin-right: 20px">
            <button class="btn btn-primary" type="button" onclick="Dialog.closeFrame(window.name)">取 消</button>
        </div>
    </div>
</div>

<!--引入公共js-->
<div th:include="common/onload_js :: onloadJS"></div>
<script type="text/javascript">

    function save() {
        Dialog.confirm('确定导入这些数据？', function (index) {
            Page.ajaxPOST(ctxPath + "/inforecord/saveImp", null, function (res) {
                Dialog.msg("导入成功,总共导入" + res.impCount + "条数据！", function () {
                    Dialog.closeFrame(window.name);
                    parent.refresh();
                });
            }, {cache: false, loadingMsg: "正在往服务器存储数据……"});
        });
    }


</script>
</body>
</html>
